@extends('layouts.header')
@section('title','智慧实验室')
@section('style')
    body{
        height:100%;
        overflow:hidden;
        background-color:rgb(1, 75, 132);
        background: url('/admin/static/myfolder/img/zks/back2.png') no-repeat;
        background-size:100% 100%;
        font-size:100%;
        line-height:2;
    }

    table > thead > tr > th  {
    font-size:110%;
    color: rgb(17, 208, 201);
    font-weight: bold;
    letter-spacing:2px;
    text-align:center;
    height:50px;
    }

    table > tbody > tr > td {
    background-color: rgb(1, 75, 132);
    color:#fff;
    border:#ccc 1px dashed;
    border-radius:10px;
    }
    /*以下设置标题栏不动，tbody超出部分滚动*/
    table tbody {
        display: block;
        height: {{request('tb_height','633')-20}}px;
        overflow-y: auto;
    }

    table thead, tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    table thead { 
        width: calc( 100% - 1em)
    }
@endsection
@section('content')
    <article class="page-container" style="padding:40px 30px;">
        <form class="form form-horizontal" id="form" autocomplete="off">
            <div class="row cl">
                <label class="form-label col-sm-2">温度：</label>
                <div class="formControls col-sm-2">
                    <input type="text" class="input-text" value="{{ $info->temp ?: '/' }} ℃" placeholder="" disabled>
                </div>
                <label class="form-label col-sm-2">湿度：</label>
                <div class="formControls col-sm-2">
                    <input type="text" class="input-text" value="{{ $info->humi ?: '/' }} %" placeholder="" disabled>
                </div>
                <label class="form-label col-sm-2">大气压：</label>
                <div class="formControls col-sm-2">
                    <input type="text" class="input-text" value="{{ $info->pressure ?: '/' }} kPa" placeholder="" disabled>
                </div>
            </div>
        </form>

        <table class="text-c" id="datatable" >
            <thead>
            <tr>
                <th>名称</th>
                <th>出厂编号</th>
                <th>型号/规格</th>
                <th>准确度/等级</th>
                <th>量程范围</th>
            </tr>
            </thead>
            <tbody style="border-collapse:separate; border-spacing:2px 5px;table-layout: fixed;">
            @foreach($stations as $k=>$item)
                <tr>
                    <td>{{$item->name}}</td>
                    <td>{{$item->fac_num}}</td>
                    <td>{{$item->spec}}</td>
                    <td>{{$item->accuracy}}</td>
                    <td>{{$item->ranges}}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </article>
    <script>
        $(function () {
            $('label , input , .select-box').css('color', '#fff');
            $('.input-text , .select-box').css('background-color','#144971').css('box-shadow','0 1px 0 0 #00dbfd').css('border-radius','20px').css('padding-left','20px');
        })
    </script>
@endsection